package com.smile.process;

import com.alibaba.fastjson2.JSONObject;
import com.smile.mqtt.process.RequestsBusinessProcessor;
import org.springframework.stereotype.Component;

/**
 * 设备端向云平台发送请求，为了获取一些信息，比如上传的临时凭证
 *
 * @author 宁海博
 */
@Component
public class RequestsBusinessProcessorImpl extends RequestsBusinessProcessor {

    @Override
    public void process(String data) {
        System.out.println("RequestsBusinessProcessorImpl 收到消息");
        System.out.println("消息内容为: " + data);
        JSONObject jsonObject = JSONObject.parseObject(data);
        System.out.println("method = " + jsonObject.get("method"));
    }
}
